package com.sjgtw.cloud.system.api.fallbackfactory;

import com.sjgtw.cloud.system.api.service.RemoteDeptService;
import feign.hystrix.FallbackFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * <p>Title: 部门服务异常处理</p>
 * <p>Description: </p>
 * @author Admin
 * @date 2021-4-7
 */
@Component
public class RemoteDeptFallbackFactory implements FallbackFactory<RemoteDeptService>
{
    private static final Logger log = LoggerFactory.getLogger(RemoteDeptFallbackFactory.class);

    @Override
    public RemoteDeptService create(Throwable throwable)
    {
        log.error("部门服务调用失败:{}", throwable.getMessage());
        return new RemoteDeptService(){

           

        };
    }
}
